class HouseItem:
    def __init__(self,name,area):
        self.name=name
        self.area=area
    def __str__(self):
        return f'{self.name}占地{self.area}'
class House:
    def __init__(self,house_type,area):
        self.house_type=house_type
        self.area=area
        self.free_area=area
        self.item_list=[]
    def __str__(self):
        return f'户型{self.house_type}总面积{self.area}剩余面积{self.free_area}家具{self.item_list}'
    def add_item(self, item:HouseItem):
        if self.free_area>=item.area:
            self.item_list.append(item.name)
            self.free_area-=item.area
        else:
            print('can not pull')
bed=HouseItem('ximengsi',4)
chest=HouseItem('YIGUI',2)
table=HouseItem('zhuozi',1.5)
house=House('liangshiyiting',60)
house.add_item(bed)
house.add_item(chest)
print(house)